const proxy = require('http-proxy-middleware');

module.exports = function (app) {
    app.use(proxy('/api', {
        target: 'https://api.bilibili.com/',
        changeOrigin: true,
        pathRewrite: {
            '^/api': '/',
        }
    }));
    // app.use(proxy('/test', { target: 'http://localhost:3000' }));
    // 省略...
};